package com.zhonghan.recharge.service;
import java.math.BigDecimal;
import java.util.List;

import com.zhonghan.common.bean.Result;
import com.zhonghan.recharge.pojo.ApplyBuyCardOrder;

public interface ApplyBuyCardOrderService{
	/**
	 * 获得ApplyBuyCardOrder数据的总行数
	 * @return
	 */
    long getApplyBuyCardOrderRowCount();
	/**
	 * 获得ApplyBuyCardOrder数据集合
	 * @return
	 */
    List<ApplyBuyCardOrder> selectApplyBuyCardOrder();
	/**
	 * 获得一个ApplyBuyCardOrder对象,以参数ApplyBuyCardOrder对象中不为空的属性作为条件进行查询
	 * @param obj
	 * @return
	 */
    List<ApplyBuyCardOrder> selectApplyBuyCardOrderByObj(ApplyBuyCardOrder obj);
	/**
	 * 通过ApplyBuyCardOrder的id获得ApplyBuyCardOrder对象
	 * @param id
	 * @return
	 */
    ApplyBuyCardOrder selectApplyBuyCardOrderById(Integer id);
	/**
	 * 插入ApplyBuyCardOrder到数据库,包括null值
	 * @param value
	 * @return
	 */
    int insertApplyBuyCardOrder(ApplyBuyCardOrder value);
	/**
	 * 插入ApplyBuyCardOrder中属性值不为null的数据到数据库
	 * @param value
	 * @return
	 */
    int insertNonEmptyApplyBuyCardOrder(ApplyBuyCardOrder value);
	/**
	 * 批量插入ApplyBuyCardOrder到数据库
	 * @param value
	 * @return
	 */
    int insertApplyBuyCardOrderByBatch(List<ApplyBuyCardOrder> value);
	/**
	 * 通过ApplyBuyCardOrder的id删除ApplyBuyCardOrder
	 * @param id
	 * @return
	 */
    int deleteApplyBuyCardOrderById(Integer id);
	/**
	 * 通过ApplyBuyCardOrder的id更新ApplyBuyCardOrder中的数据,包括null值
	 * @param enti
	 * @return
	 */
    int updateApplyBuyCardOrderById(ApplyBuyCardOrder enti);
	/**
	 * 通过ApplyBuyCardOrder的id更新ApplyBuyCardOrder中属性不为null的数据
	 * @param enti
	 * @return
	 */
    int updateNonEmptyApplyBuyCardOrderById(ApplyBuyCardOrder enti);
    /**
     * 保存订单
     * @param name
     * @param telephone
     * @param openId 
     * @return
     */
	Result addApplyBuyCardOrder(String name, String telephone, String openId);
	/**
	 * 查询订单
	 * @param id
	 * @param orderStatus
	 * @param telephone
	 * @param endTime 
	 * @param beginTime 
	 * @return
	 */
	Result getApplyBuyCardOrderByCondition(Integer pageNum,Integer pageSize,Integer id, Integer orderStatus, String telephone, String beginTime, String endTime);
	
	/**
	 * 更新信息
	 * @param id
	 * @param payAmount
	 * @param donationAmount
	 * @param cardSegment
	 * @param isPay
	 * @param orderStatus
	 * @return
	 */
	Result updateApplyBuyCard(Integer id, BigDecimal payAmount, BigDecimal donationAmount, String cardSegment,
			Integer isPay, Integer orderStatus);
}